import java.util.List;
import java.util.LinkedList;

public class Production{
    private List<Simbol> simbols;
    private List<SintaxRule> srsimbols;

    public Production (){
	this.simbols=new LinkedList<Simbol>();
	this.srsimbols=new LinkedList<SintaxRule>();
    }
    
    public List<Simbol> getSimbols(){
	return this.simbols;
    }

    public void addSimbol(Simbol s){
	this.simbols.add(s);
    }
    
    public List<SintaxRule> getSRSimbols(){
	return this.srsimbols;
    }

    public void addSRSimbol(SintaxRule sr){
	this.srsimbols.add(sr);
    }

    public void addTerms(List<Simbol> simbols, List<SintaxRule> srsimbols){
	SintaxRule sr;
	Simbol s;
	int srsize=this.srsimbols.size(), ssize=this.simbols.size();
	for(int i=0;i<srsimbols.size();i++){
	    sr=srsimbols.get(i);
	    sr.setPosition(sr.getPosition()+srsize);
	    this.srsimbols.add(sr);
	}

	for(int i=0;i<simbols.size();i++)
	    this.simbols.add(simbols.get(i));
	
    }
}